package com.fast.common.custom;


import com.fast.common.result.ApiCode;
import lombok.Getter;
import org.springframework.security.core.AuthenticationException;

/**
 * 对象功能:
 * <p>
 * 开发公司: 幼稚原创
 * 开发人员: Administrator
 * 创建时间: 2019/12/18 0018 19:37
 */
public class BaseAuthException extends AuthenticationException {

    @Getter
    private Integer code;

    public BaseAuthException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public BaseAuthException(ApiCode apiCode) {
        super(apiCode.getMsg());
        this.code = apiCode.getCode();
    }
}
